<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="./masterpage/masterpage.xhtml">
	<ui:define name="title">Transfer money</ui:define>
	<ui:define name="content">
		<h:form>
			<div class="title">
				<h3>Make a transfer:</h3>
			</div>
			<div id="transferPage">
				<h:messages style="color: red;"></h:messages>
				<table width="500">
					<tr>
						<td>Deposit account number:</td>
						<td><h:selectOneMenu class="inputLen" required="true"
								requiredMessage="Account number is required!"
								value="#{transferMoneyManageBean.accounNumChoosen}">
								<f:selectItems value="#{customerManageBean.listAccount}" var="x"
									itemLabel="#{x.accountNumber}" itemValue="#{x.accountNumber}" />
							</h:selectOneMenu></td>
					</tr>
					<tr>
						<td>Transfer to account:</td>
						<td><h:inputText class="inputLen"
								value="#{transferMoneyManageBean.accountNumber}"
								style="width:200px;" required="true"
								requiredMessage="Transfer account is required!"
								label="Transfer account">
								<f:validateLength minimum="12"></f:validateLength>
							</h:inputText></td>
					</tr>
					<tr>
						<td>Amount</td>
						<td><h:inputText value="#{transferMoneyManageBean.fund}"
								class="inputLen" label="Ammount number" style="width:200px;"
								required="true" requiredMessage="Ammount number is required!">
								<f:validateDoubleRange minimum="10000"></f:validateDoubleRange>
							</h:inputText></td>
					</tr>
					<tr>
						<td>Content:</td>
						<td><h:inputTextarea
								value="#{transferMoneyManageBean.content}" class="inputLen"
								style="width:300px;" /></td>
					</tr>
					<tr>
						<td><h:commandButton value="Confirm"
								action="#{transferMoneyManageBean.confirmTransfer}" /></td>
						<td><h:commandButton value="Back" /></td>
					</tr>

				</table>
			</div>

		</h:form>
	</ui:define>
</ui:composition>
</html>